package InnerClass;

public class OuterClassTest {
    public static void main(String[] args) {
        Person.dog d1= new Person.dog();
        d1.eat();
        Person p1 = new Person();
        Person.bird b1=p1.new bird();
        b1.eat();
        b1.show("哈哈");
    }
}
class Person{
    String name="Bob";
    static class dog{
        public void eat(){
            System.out.println("eat bone");
        }

    }
    class bird{
        int age=18;
        String name="小白";
        public void eat(){
            System.out.println("eat worms");
        }
        public void show(String name){
            System.out.println("name:"+name);
            System.out.println("personname:"+this.name);
            System.out.println("personname:"+Person.this.name);
        }
    }
    public void  method(){
        class InnerClass1{

        }
    }
    void method1(){
        class innerClass1{

        }
    }

}
